﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using L = Science.Mathematics.LinearAlgebra;

namespace Strang3Ed.Chapter02.Section3
{
    public class ExampleC
    {
        public ExampleC()
        {
        }
        private string result;
        public string Result
        {
            get { return result; }
        }
        public void Compute()
        {
            double[,] x = {{3.0,4.0},
                           {1.0,5.0},
                           {2.0,0.0}};

            L.Matrix A = new L.Matrix(x);

            double[,] y = {{2.0,4.0},
                           {1.0,1.0}};

            L.Matrix B = new L.Matrix(y);

            L.Matrix AB = A*B;

            result += AB[0, 0].ToString() + "    ";
            result += AB[0, 1].ToString() + "\r\n";

            result += AB[1, 0].ToString() + "    ";
            result += AB[1, 1].ToString() + "\r\n";

            result += AB[2, 0].ToString() + "    ";
            result += AB[2, 1].ToString() + "\r\n";
        }
    }
}
/*
10    16
7    9
4    8
*/

